using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_PromoteProjectTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_PromoteProjectTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_PromoteProjectTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_PromoteProject";
			dataTableMapping.ColumnMappings.Add("ProjectID", "ProjectID");
			dataTableMapping.ColumnMappings.Add("ProjectName", "ProjectName");
			dataTableMapping.ColumnMappings.Add("BeginDate", "BeginDate");
			dataTableMapping.ColumnMappings.Add("EndDate", "EndDate");
			dataTableMapping.ColumnMappings.Add("MinMoney", "MinMoney");
			dataTableMapping.ColumnMappings.Add("MaxMoney", "MaxMoney");
			dataTableMapping.ColumnMappings.Add("PresentContent", "PresentContent");
			dataTableMapping.ColumnMappings.Add("Price", "Price");
			dataTableMapping.ColumnMappings.Add("PresentID", "PresentID");
			dataTableMapping.ColumnMappings.Add("Cash", "Cash");
			dataTableMapping.ColumnMappings.Add("PresentExp", "PresentExp");
			dataTableMapping.ColumnMappings.Add("PresentPoint", "PresentPoint");
			dataTableMapping.ColumnMappings.Add("SalerID", "SalerID");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_PromoteProject] WHERE (([ProjectID] = @Original_ProjectID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_ProjectID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ProjectID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_PromoteProject] ([ProjectName], [BeginDate], [EndDate], [MinMoney], [MaxMoney], [PresentContent], [Price], [PresentID], [Cash], [PresentExp], [PresentPoint], [SalerID]) VALUES (@ProjectName, @BeginDate, @EndDate, @MinMoney, @MaxMoney, @PresentContent, @Price, @PresentID, @Cash, @PresentExp, @PresentPoint, @SalerID)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@BeginDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "BeginDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@EndDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "EndDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MinMoney", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "MinMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MaxMoney", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "MaxMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PresentContent", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "PresentContent", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Price", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "Price", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PresentID", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "PresentID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Cash", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "Cash", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PresentExp", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentExp", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PresentPoint", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentPoint", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_PromoteProject] SET [ProjectName] = @ProjectName, [BeginDate] = @BeginDate, [EndDate] = @EndDate, [MinMoney] = @MinMoney, [MaxMoney] = @MaxMoney, [PresentContent] = @PresentContent, [Price] = @Price, [PresentID] = @PresentID, [Cash] = @Cash, [PresentExp] = @PresentExp, [PresentPoint] = @PresentPoint, [SalerID] = @SalerID WHERE (([ProjectID] = @Original_ProjectID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ProjectName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ProjectName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@BeginDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "BeginDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@EndDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "EndDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MinMoney", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "MinMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MaxMoney", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "MaxMoney", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PresentContent", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "PresentContent", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Price", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "Price", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PresentID", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "PresentID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Cash", SqlDbType.Money, 0, ParameterDirection.Input, 0, 0, "Cash", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PresentExp", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentExp", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PresentPoint", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PresentPoint", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_ProjectID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ProjectID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[3];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT HLShop_PromoteProject.*\r\nFROM HLShop_PromoteProject";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "SELECT BeginDate, Cash, EndDate, MaxMoney, MinMoney, PresentContent, PresentExp, PresentID, PresentPoint, Price, ProjectID, ProjectName, SalerID FROM HLShop_PromoteProject WHERE (ProjectID = @ProjectID)";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@ProjectID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ProjectID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT BeginDate, Cash, EndDate, MaxMoney, MinMoney, PresentContent, PresentExp, PresentID, PresentPoint, Price, ProjectID, ProjectName, SalerID FROM HLShop_PromoteProject WHERE (SalerID = @SalerID)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@SalerID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "SalerID", DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PromoteProject.HLShop_PromoteProjectDataTable GetAllPromoteProject()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_PromoteProject.HLShop_PromoteProjectDataTable hLShop_PromoteProjectDataTable = new S_PromoteProject.HLShop_PromoteProjectDataTable();
			this.Adapter.Fill(hLShop_PromoteProjectDataTable);
			return hLShop_PromoteProjectDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Fill, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int FillBy(S_PromoteProject.HLShop_PromoteProjectDataTable dataTable, int ProjectID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[1];
			this.Adapter.SelectCommand.Parameters[0].Value = ProjectID;
			if (this.ClearBeforeFill)
			{
				dataTable.Clear();
			}
			return this.Adapter.Fill(dataTable);
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PromoteProject.HLShop_PromoteProjectDataTable GetProjectByID(int ProjectID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[1];
			this.Adapter.SelectCommand.Parameters[0].Value = ProjectID;
			S_PromoteProject.HLShop_PromoteProjectDataTable hLShop_PromoteProjectDataTable = new S_PromoteProject.HLShop_PromoteProjectDataTable();
			this.Adapter.Fill(hLShop_PromoteProjectDataTable);
			return hLShop_PromoteProjectDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PromoteProject.HLShop_PromoteProjectDataTable GetProjectBySalerID(int? SalerID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			if (SalerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = SalerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			S_PromoteProject.HLShop_PromoteProjectDataTable hLShop_PromoteProjectDataTable = new S_PromoteProject.HLShop_PromoteProjectDataTable();
			this.Adapter.Fill(hLShop_PromoteProjectDataTable);
			return hLShop_PromoteProjectDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_PromoteProject.HLShop_PromoteProjectDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_PromoteProject dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_PromoteProject");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Delete(int Original_ProjectID)
		{
			this.Adapter.DeleteCommand.Parameters[0].Value = Original_ProjectID;
			ConnectionState state = this.Adapter.DeleteCommand.Connection.State;
			if ((this.Adapter.DeleteCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.DeleteCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.DeleteCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.DeleteCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Insert, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Insert(string ProjectName, System.DateTime? BeginDate, System.DateTime? EndDate, decimal? MinMoney, decimal? MaxMoney, string PresentContent, decimal? Price, string PresentID, decimal? Cash, int? PresentExp, int? PresentPoint, int SalerID)
		{
			if (ProjectName == null)
			{
				this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[0].Value = ProjectName;
			}
			if (BeginDate.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[1].Value = BeginDate.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (EndDate.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[2].Value = EndDate.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (MinMoney.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[3].Value = MinMoney.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (MaxMoney.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[4].Value = MaxMoney.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (PresentContent == null)
			{
				this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[5].Value = PresentContent;
			}
			if (Price.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[6].Value = Price.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (PresentID == null)
			{
				this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[7].Value = PresentID;
			}
			if (Cash.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[8].Value = Cash.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (PresentExp.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[9].Value = PresentExp.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (PresentPoint.HasValue)
			{
				this.Adapter.InsertCommand.Parameters[10].Value = PresentPoint.Value;
			}
			else
			{
				this.Adapter.InsertCommand.Parameters[10].Value = System.DBNull.Value;
			}
			this.Adapter.InsertCommand.Parameters[11].Value = SalerID;
			ConnectionState state = this.Adapter.InsertCommand.Connection.State;
			if ((this.Adapter.InsertCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.InsertCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.InsertCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.InsertCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(string ProjectName, System.DateTime? BeginDate, System.DateTime? EndDate, decimal? MinMoney, decimal? MaxMoney, string PresentContent, decimal? Price, string PresentID, decimal? Cash, int? PresentExp, int? PresentPoint, int SalerID, int Original_ProjectID)
		{
			if (ProjectName == null)
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[0].Value = ProjectName;
			}
			if (BeginDate.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = BeginDate.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (EndDate.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = EndDate.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (MinMoney.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = MinMoney.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
			}
			if (MaxMoney.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = MaxMoney.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
			}
			if (PresentContent == null)
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[5].Value = PresentContent;
			}
			if (Price.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = Price.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
			}
			if (PresentID == null)
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[7].Value = PresentID;
			}
			if (Cash.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = Cash.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
			}
			if (PresentExp.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = PresentExp.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
			}
			if (PresentPoint.HasValue)
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = PresentPoint.Value;
			}
			else
			{
				this.Adapter.UpdateCommand.Parameters[10].Value = System.DBNull.Value;
			}
			this.Adapter.UpdateCommand.Parameters[11].Value = SalerID;
			this.Adapter.UpdateCommand.Parameters[12].Value = Original_ProjectID;
			ConnectionState state = this.Adapter.UpdateCommand.Connection.State;
			if ((this.Adapter.UpdateCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				this.Adapter.UpdateCommand.Connection.Open();
			}
			int result;
			try
			{
				int num = this.Adapter.UpdateCommand.ExecuteNonQuery();
				result = num;
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					this.Adapter.UpdateCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
